<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <style>
        img{
            width: 500px;
            height: 400px;
        }
    </style>
</head>
<body>
    <div id="app">
        <img v-bind:src="imgUrl" :title="imgTitle">
        <h4>水果店</h4>
        <ul>
            <li v-for="(item,index) in list">
                <p>{{index}}-{{item}}</p>
            </li>
        </ul>
        <ul>
            <li v-for="(item,index) in list2" :key="item.id">
                <p>{{item.name}}-{{item.color}}</p>
            </li>
        </ul>
    </div>
</body>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            imgUrl: '/tu1.png',
            imgTitle: '图片2',
            list:['苹果','香蕉','橘子','橘子','橘子'],
            list2:[{'id':'1','name':'苹果','color':'红色'},{'id':'2','name':'香蕉','color':'黄色'}]
        }

    })
</script>
</html>